<?php
    if(file_exists("../data/TicketDA.php")){
        include_once ("../data/TicketDA.php");
    }
    
    class TicketBR{
        public $context;
        public function TicketBR(){
            $this->context = new TicketDA();
        }
        public function generarCodigo(){
            $registros = $this->context->generarCodigo();
            return $registros;
        }
        public function insertar($entity){
            $registros = $this->context->insertar($entity);
            return $registros;
        }
        public function buscarTicket($ID_TICKET){
            $registros = $this->context->buscarTicket($ID_TICKET);
            return $registros;
        }
        public function validarTicket($codigo){
            $registros = $this->context->validarTicket($codigo);
            return $registros;
        }
        public function actualizarTicket($entity){
            $registros = $this->context->actualizarTicket($entity);
            return $registros;
        }
        public function numeroRegistro($codigo,$fecha_desde,$fecha_hasta){
            return $this->context->numeroRegistro($codigo,$fecha_desde,$fecha_hasta);
        }
        public function BuscarSearch($entity ,$start=1, $limit=100,$sidx=1,$sord=""){
            $registros = $this->context->BuscarSearch($entity,$start , $limit,$sidx,$sord);
            return $registros;
        }
    }
?>
